import service from '@/utils/request'
// @Tags Rules
// @Summary 创建rules表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Rules true "创建rules表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /rules/createRules [post]
export const createRules = (data) => {
  return service({
    url: '/rules/createRules',
    method: 'post',
    data
  })
}

// @Tags Rules
// @Summary 删除rules表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Rules true "删除rules表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /rules/deleteRules [delete]
export const deleteRules = (params) => {
  return service({
    url: '/rules/deleteRules',
    method: 'delete',
    params
  })
}

// @Tags Rules
// @Summary 批量删除rules表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除rules表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /rules/deleteRules [delete]
export const deleteRulesByIds = (params) => {
  return service({
    url: '/rules/deleteRulesByIds',
    method: 'delete',
    params
  })
}

// @Tags Rules
// @Summary 更新rules表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Rules true "更新rules表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /rules/updateRules [put]
export const updateRules = (data) => {
  return service({
    url: '/rules/updateRules',
    method: 'put',
    data
  })
}

// @Tags Rules
// @Summary 用id查询rules表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Rules true "用id查询rules表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /rules/findRules [get]
export const findRules = (params) => {
  return service({
    url: '/rules/findRules',
    method: 'get',
    params
  })
}

// @Tags Rules
// @Summary 分页获取rules表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取rules表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /rules/getRulesList [get]
export const getRulesList = (params) => {
  return service({
    url: '/rules/getRulesList',
    method: 'get',
    params
  })
}

// @Tags Rules
// @Summary 不需要鉴权的rules表接口
// @accept application/json
// @Produce application/json
// @Param data query ruleReq.RulesSearch true "分页获取rules表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /rules/getRulesPublic [get]
export const getRulesPublic = () => {
  return service({
    url: '/rules/getRulesPublic',
    method: 'get',
  })
}
